package com.jintian.smart.kernel.flowable.mapper;

import com.jintian.smart.kernel.flowable.domain.entity.ActHiTaskInst;
import com.jintian.smart.kernel.flowable.domain.query.BusinessQuery;
import org.beetl.sql.core.page.PageRequest;
import org.beetl.sql.core.page.PageResult;
import org.beetl.sql.mapper.annotation.Mapper;
import org.beetl.sql.mapper.annotation.Param;
import org.beetl.sql.mapper.annotation.SqlResource;

import java.util.List;
import java.util.Map;

@Mapper
@SqlResource("task.business")
public interface IBusinessMapper {
    PageResult<ActHiTaskInst> queryWaitingTask(PageRequest<?> page);

    PageResult<ActHiTaskInst> queryFinishTask(PageRequest<?> page);

    PageResult<Map<String, Object>> statisticsOrgJxgl(@Param("query") BusinessQuery query, PageRequest<?> page);

    Map<String, Object> statisticsOrgPie(@Param("query") BusinessQuery query);

    PageResult<Map<String, Object>> statisticsPosJxgl(@Param("query") BusinessQuery query, PageRequest<?> page);

    Map<String, Object> statisticsPosPie(@Param("query") BusinessQuery query);

    PageResult<Map<String, Object>> statisticsBusJxgl(@Param("query") BusinessQuery query, PageRequest<?> page);

    Map<String, Object> statisticsBusPie(@Param("query") BusinessQuery query);

    String queryOrgLbglColumns(@Param("query") BusinessQuery query);

    String queryPosLbglColumns(@Param("query") BusinessQuery query);

    PageResult<Map<String, Object>> statisticsOrgLbglList(@Param("query") BusinessQuery query, PageRequest<?> page);

    PageResult<Map<String, Object>> statisticsPosLbglList(@Param("query") BusinessQuery query, PageRequest<?> page);

    List<Map<String, Object>> statisticsOrgLbglBar(@Param("query") BusinessQuery query);

    List<Map<String, Object>> statisticsPosLbglBar(@Param("query") BusinessQuery query);
}
